package cn.com.ddapp.ddm.ui;

import android.view.View;
import android.widget.AdapterView;
import android.widget.EditText;
import android.widget.GridView;
import android.widget.TextView;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import cn.com.ddapp.ddm.R;
import cn.com.ddapp.ddm.adapter.RechargeMoneyAdapter;
import cn.com.ddapp.ddm.base.BaseActivity;

/**
 * 充值
 */
public class RechargeActivity extends BaseActivity{
    @BindView(R.id.re_money)
    EditText re_money;
    @BindView(R.id.recharge_money)
    GridView recharge_money;
    @BindView(R.id.recharge_sure)
    TextView recharge_sure; //充值
    private List<String> list;
    private RechargeMoneyAdapter rAdapter;
  String seMoney;
    @Override
    public void initView() {
        setTitleLeftImg(R.mipmap.back_icon);
        setTitle("充值");
        list=new ArrayList<String>();
        list.add("10元");
        list.add("50元");
        list.add("100元");
        list.add("500元");
        list.add("1000元");
        list.add("1500元");
        list.add("2000元");
        list.add("2500元");
        list.add("3000元");
        rAdapter=new RechargeMoneyAdapter(getApplicationContext(),list);
        recharge_money.setAdapter(rAdapter);
        recharge_money.setOnItemClickListener(new AdapterView.OnItemClickListener() {
            @Override
            public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
                seMoney=list.get(i);
//                Log.i("yu","--"+seMoney);
            }
        });
    }

    @Override
    public void initData() {
        reequestData();
    }

    private void reequestData() {
    }

    @Override
    public int getContentViewId() {
        return R.layout.activity_recharge;
    }


    @Override
    protected String getFragmentTag() {
        return RechargeActivity.class.getSimpleName();
    }

//    @OnClick({R.id.recharge_sure})
//    public void onClick(View view){
//        String money=re_money.getText().toString();
//        switch (view.getId()){
//            case R.id.recharge_sure:
//                break;
//        }
//    }
}
